﻿// ==========================================================================
// NavigateToSampleMessage.cs
// Silverlight Shapes Library
// ==========================================================================
// Copyright (c) Silverlight Shapes Development Group
// All rights reserved.
// ==========================================================================

using System;
using GalaSoft.MvvmLight.Messaging;

namespace SD.Samples.Messages
{
    /// <summary>
    /// Use this message to navigate to a example.
    /// </summary>
    public sealed class NavigateToSampleMessage : GenericMessage<string>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="NavigateToSampleMessage"/> class with 
        /// the name of the sample to navigate to.
        /// </summary>
        /// <param name="sample">The name of the sample to navigate to. Cannot be null or empty.</param>
        /// <exception cref="ArgumentException"><paramref name="sample"/> is null or empty.</exception>
        public NavigateToSampleMessage(string sample)
            : base(sample)
        {
            if (string.IsNullOrEmpty(sample))
            {
                throw new ArgumentException("Sample cannot be null or empty.", "sample");
            }
        }
    }
}
